home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / CRYPT20.ZIP / GETSCR.ASM < prev    next >
Assembly Source File  |  1993-11-07  |  2KB  |  78 lines

  1. ;Video Capture for 320x200x256 mode - hit print-screen to capture.
  2. ;creates file message.scr
  3. .model tiny
  4. .radix 16
  5. .code
  6.         org 100
  7. start:
  8.         mov     ax,2505
  9.         mov     dx,offset Int05
  10.         int     21
  11.  
  12.         mov     dx,offset end_prog+1
  13.         int     27
  14.  
  15.  
  16.  
  17. Int05:
  18.         pushf
  19.         push    ax bx cx dx es ds si di bp
  20.  
  21.         push    cs cs        
  22.         pop     es ds
  23. CheckIf320x200x256:        
  24.         mov     ah,0f
  25.         int     10
  26.         cmp     al,13
  27.         jne     EndCapture
  28.  
  29. CreateFile:        
  30.         mov     ah,3c
  31.         mov     dx,offset filename
  32.         xor     cx,cx
  33.         int     21
  34.         jc      EndCapture
  35.  
  36.         xchg    bx,ax
  37.                 
  38.         call    Getcolors
  39. WriteColors:
  40.         mov     dx,offset colors
  41.         mov     cx,300
  42.         mov     ah,40
  43.         int     21
  44.         
  45. WriteScreen:        
  46.         mov     dx,0a000
  47.         mov     ds,dx
  48.         xor     dx,dx
  49.         mov     cx,320d*200d
  50.         mov     ah,40
  51.         int     21
  52.  
  53. CloseFile:        
  54.         mov     ah,3e
  55.         int     21
  56. EndCapture:        
  57.         pop     bp di si ds es dx cx bx ax
  58.         popf
  59.         iret
  60.  
  61. Getcolors:
  62.         push    bx
  63.         mov     ax,1017
  64.         mov     bx,0
  65.         mov     cx,0ff
  66.         mov     dx,offset colors
  67.         push    cs
  68.         pop     es
  69.         int     10
  70.         pop     bx
  71.         ret
  72.  
  73. filename        db      'Message.Scr',0
  74. colors  db      300 dup(?)
  75.  
  76. end_prog:
  77. end start
  78.